
== Controller 层
@ApiOperation(value = "获取分销员分页订单列表")
@GetMapping("/distributionOrder")
public ResultMessage<IPage<DistributionOrder>> distributionOrderPage(DistributionOrderSearchParams distributionOrderSearchParams) {
    distributionOrderSearchParams.setDistributionId(distributionService.getDistribution().getId());
    return ResultUtil.data(distributionOrderService.getDistributionOrderPage(distributionOrderSearchParams));
}

== 分页查询传入参数
@Data
@ApiModel(value = "分销订单查询对象")
public class DistributionOrderSearchParams extends PageVO {

    private static final long serialVersionUID = 随机数L;

    @ApiModelProperty(value = "分销员名称")  与 DistributionOrder相一致 略
    private String distributionName;
    ......

    public <T> QueryWrapper<T> queryWrapper() {
        QueryWrapper<T> queryWrapper = Wrappers.query();
            queryWrapper.like(StringUtils.isNotBlank(distributionName), "distribution_name", distributionName);
            queryWrapper.eq(StringUtils.isNotBlank(distributionOrderStatus), "distribution_order_status", distributionOrderStatus);
            queryWrapper.eq(StringUtils.isNotBlank(orderSn), "order_sn", orderSn);
            queryWrapper.eq(StringUtils.isNotBlank(distributionId), "distribution_id", distributionId);
            queryWrapper.eq(StringUtils.isNotBlank(storeId), "store_id", storeId);
            if (endTime != null && startTime != null) {
                endTime = DateUtil.endOfDate(endTime);
                queryWrapper.between("create_time", startTime, endTime);
            }
            return queryWrapper;
    }
}

== entity对象
@Data
@ApiModel(value = "分销订单")
@TableName("dios_shop_distribution_order")
@NoArgsConstructor
public class DistributionOrder extends BaseIdEntity {

    private static final long serialVersionUID = 501799944909496507L;

}

== service层
IPage<DistributionOrder> getDistributionOrderPage(DistributionOrderSearchParams distributionOrderSearchParams);


== service实现层
@Override
public IPage<DistributionOrder> getDistributionOrderPage(DistributionOrderSearchParams distributionOrderSearchParams) {
    return this.page(PageUtil.initPage(distributionOrderSearchParams), distributionOrderSearchParams.queryWrapper());
}

